<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<script type="text/javascript">
	$(function() {
		$('.sidebar .sub-menu > a').click(function() {
			var last = $('.sub-menu.open', $('.sidebar'));
			last.removeClass("open");
			$('.arrow', last).removeClass("open");
			$('.sub', last).slideUp(200);
			var sub = $(this).next();
			if (sub.is(":visible")) {
				$('.arrow', $(this)).removeClass("open");
				$(this).parent().removeClass("open");
				sub.slideUp(200);
			} else {
				$('.arrow', $(this)).addClass("open");
				$(this).parent().addClass("open");
				sub.slideDown(200);
			}
			//var o = ($(this).offset());
			//diff = 200 - o.top;
			// if(diff>0)
			//     $(".sidebar-scroll").scrollTo("-="+Math.abs(diff),500);
			// else
			//    $(".sidebar-scroll").scrollTo("+="+Math.abs(diff),500);
		});
	});
</script>
<!-- 侧边导航 -->
<div class="sidebar col-md-2">
	<ul>
		<li class="sub-menu"><a><i class="fa fa-dashboard"></i><span>控制台</span></a></li>
		<li class="sub-menu"><a href="javascript:void(0);"> <i
				class="fa fa-book"></i><span>UI控件</span> <span class="arrow"></span></a>
			<ul class="sub">
				<li><a>通用</a></li>
				<li><a>按钮</a></li>
				<li><a>滑动</a></li>
			</ul></li>
		<li class="sub-menu"><a href="${webpath}/login.jsp"><i
				class="fa fa-user"></i><span>登录页面</span></a></li>
	</ul>
</div>
